/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
#if(data.subModuleName != null && data.subModuleName != "")
package #(data.packageName+"."+data.moduleName+"."+data.subModuleName).entity;
#else
package #(data.packageName+"."+data.moduleName).entity;
#end

import java.util.Date;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.opsli.core.base.entity.BaseEntity;

/**
 * @BelongsProject: opsli-boot
#if(data.subModuleName != null && data.subModuleName != "")
 * @BelongsPackage: #(data.packageName+"."+data.moduleName+"."+data.subModuleName).entity
#else
 * @BelongsPackage: #(data.packageName+"."+data.moduleName).entity
#end
 * @Author: #(data.authorName)
 * @CreateTime: #(currTime)
 * @Description: #(data.codeTitle)
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class #(data.model.tableName) extends BaseEntity {


    #for(column : data.model.columnList)
    ### 不等于 删除字段 和 不等于 租户字段放入上边
    #if(column.fieldName != "deleted" && column.fieldName != "tenantId")
    /** #(column.fieldComments) */
    #if(!column.izNotNull)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    #end
    private #(column.javaType) #(column.fieldName);

    #end
    #end

    // ========================================

    ### 专门处理 删除字段 和 租户字段
    #for(column : data.model.columnList)
    #if(column.fieldName == "deleted")
    /** 逻辑删除字段 */
    @TableLogic
    private Integer deleted;
    #else if(column.fieldName == "tenantId")
    /** 多租户字段 */
    private String tenantId;
    #end

    #end

}
